﻿/*
 * Created by SharpDevelop.
 * User: chasanek
 * Date: 01-4-2011
 * Time: 10:37
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Drawing;
using System.Collections.Generic;
using System.Windows.Forms;

namespace legends
{
	/// <summary>
	/// Description of MainForm.
	/// </summary>

	public partial class MenuForm : Form
	{
		public GameConstants gameConstants = new GameConstants(10,1024,768);		//initiates gameplay constants variable
            
		public MenuForm()
		{
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			
		
			//
			// Setting variables of gameConstants instance to default. Can be changed in setting
			//			
			Screen Srn = Screen.PrimaryScreen;
			int tempWidth = Srn.Bounds.Width;
			int tempHeight = Srn.Bounds.Height;
			gameConstants.setRes(tempWidth,tempHeight);
				
			//
			// Changing resolution according to computers resolution
			//				
			this.ClientSize = new System.Drawing.Size(gameConstants.getResWidth(),gameConstants.getResHeight());
            MainMenuPanel.Left = gameConstants.getResWidth()/2-25;
			

		}

        #region buttons	
        //
        // button shows form for creating new character
        //
        private void NewGameButton_Click(object sender, EventArgs e)
        {
            NewCharacterForm characterForm = new NewCharacterForm(gameConstants);
            characterForm.Show();

            this.Visible = false;
        }

        //
        // button shows world editor form
        //
        private void WorldEditorButton_Click_1(object sender, EventArgs e)
        {
            WorldEditForm worldEditForm = new WorldEditForm(gameConstants);
            worldEditForm.Show();

            this.Visible = false;
        }

        //
        // button shows settings dialog window
        //
        private void SettingsButton_Click_1(object sender, EventArgs e)
        {
            SettingsForm settings = new SettingsForm(this);
            settings.ShowDialog();
        }

        //
        // Not implemented yet
        //
        private void ContinueGameButton_Click(object sender, EventArgs e)
        {

        }

        //
        // Button exits application
        //
        private void ExitButton_Click(object sender, EventArgs e)
        {
            this.Close();
            this.Dispose();
            Application.Exit();
        }
        #endregion







    }
}
